<?php   

$line = array('MAC');
$csv->addRow($line);

WHILE($row = mysql_fetch_array($result))
{	
	$line = array($row["mac"]);
    $csv->addRow($line);	
}

$title = "MAC-EXPORT-NEXT-500.csv";
echo $csv->render($title);


?>